import java.util.Objects;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WJW
 * Date: 2024-07-27
 * Time: 16:34
 */

class Student{
    public String id;
    public Student(String id){
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}

public class Test {
    public static void main1(String[] args) {
        Student student1 = new Student("61012345");
        Student student2 = new Student("61012345");
        HashBuck2<Student,Integer> hashBuck2 = new HashBuck2<>();
        hashBuck2.put(student1,10);
        Integer v = hashBuck2.getValue(student2);
        System.out.println(v);
    }
    public static void main(String[] args) {
        HashBuck hashBuck = new HashBuck();
        hashBuck.put(1,11);
        hashBuck.put(2,22);
        hashBuck.put(3,33);
        hashBuck.put(5,55);
        hashBuck.put(6,66);
        hashBuck.put(9,99);

        System.out.println(hashBuck.get(9));
    }
}
